package serverDB_classes;

import java.util.HashSet;
import java.util.Set;

/**
 * UserData - hold the detail of a user, include: 
 * 				user name,password,first name, last name
 * @author Orit
 *
 */
public class UserData {
    private String userName;
    private String password;
    private String firstName;
    private String lastName;
    private int userId;
    private Set<Dir> dirs=new HashSet<Dir>(0);
    
    /**
     * Cto'r of User Data
     * @param userName user's user name
     * @param password user's password
     * @param firstName user's first name
     * @param lastName user's last name
     */
    public UserData(String userName, String password,String firstName,String lastName) {
		this.userName=userName;
		this.firstName=firstName;
		this.lastName=lastName;
		this.password=password;
	}
    
    /**
     * default Cto'r User Data
     */
    public UserData() {
		
	}
	//-----------------setters----------------//
   
    /**
     * set user name
     * @param value
     */
    public void setUserName( String value ){
        userName = value;
    }
    /**
     * set the user id
     * @param userId
     */
    public void setUserId(int userId) {
		this.userId = userId;
	}
    /**
     * set the password of the user
     * @param password
     */
    public void setPassword(String password) {
		this.password = password;
	} 
    /**
     * set the first name of the user
     * @param first_name
     */
    public void setFirstName(String first_name) {
		this.firstName = first_name;
	}
    /**
     * set the last name of the user
     * @param last_name
     */
    public void setLastName(String last_name) {
		this.lastName = last_name;
	}
    /**
     * set of all the directories that the user have
     * @param dirs
     */
    public void setDirs(Set<Dir> dirs) {
		this.dirs = dirs;
	}
	//-----------------getters----------------//
    
    /**
     * @return  the user name of the user (his email)
     */
    public String getUserName() { return userName; }
    
    /**
     * @return password of the user 
     */
    public String getPassword() {	return password;  }
    /**
     * @return first name of the user
     */
    public String getFirstName() {	return firstName;}
    /**
     * @return last name of the user
     */
    public String getLastName() {  return lastName; }
    /**
     * @return set of all the directories that the user have
     */
    public Set<Dir> getDirs() {
		return dirs;
	}
    /**
     * @return user id
     */
    public int getUserId() {
		return userId;
	}
}
